/*
 * Copyright (C) 2015 备胎金服
 * 未经授权允许不得进行拷贝和修改
 *   http://www.btjf.com/
 */
package com.zhangman.androidgame;

/**
 * Created by zhangman on 2016/11/1 16:07.
 * Email: zhangman523@126.com
 */
public class Background {
  private int bgX, bgY, speedX;

  public Background(int bgX, int bgY) {
    this.bgX = bgX;
    this.bgY = bgY;
    speedX = 0;
  }

  public void update() {
    bgX += speedX;
    if (bgX <= -2160) {
      bgX += 4320;
    }
  }

  public int getBgX() {
    return bgX;
  }

  public void setBgX(int bgX) {
    this.bgX = bgX;
  }

  public int getBgY() {
    return bgY;
  }

  public void setBgY(int bgY) {
    this.bgY = bgY;
  }

  public int getSpeedX() {
    return speedX;
  }

  public void setSpeedX(int speedX) {
    this.speedX = speedX;
  }
}
